package com.emip.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.emip.bean.QuarterStoreBean;
import com.emip.dao.QuarterStoreDAO;
import com.emip.service.QuarterStoreService;



@Service("quarterStoreService")
public class QuarterStoreServiceImpl implements QuarterStoreService {

	@Autowired
	QuarterStoreDAO quarterStoreDAO;
	
	public List<QuarterStoreBean> getByTimespan(int startYear, int startQuarter,
			int endYear, int endQuarter, String[] itemIds, String siteId) {
		return quarterStoreDAO.getByTimespan(startYear, startQuarter, endYear, endQuarter, itemIds, siteId);
	}

	public QuarterStoreBean merge(QuarterStoreBean store) {
		return quarterStoreDAO.merge(store);
	}

	public QuarterStoreBean findByQuarter(String year, String quarter, String siteId,
			String itemId) {
		return quarterStoreDAO.findByQuarter(year, quarter, siteId, itemId);
	}

	public List<QuarterStoreBean> getByTimespan(int startYear, int startQuarter,
			int endYear, int endQuarter, String[] itemIds, String siteId,
			int page, int size) {
		return quarterStoreDAO.getByTimespan(startYear, startQuarter, endYear, endQuarter, itemIds, siteId, page, size);
	}

	public long getCount(int startYear, int startQuarter, int endYear,
			int endQuarter, String[] itemIds, String siteId) {
		return quarterStoreDAO.getCount(startYear, startQuarter, endYear, endQuarter, itemIds, siteId);
	}

	public Object[] getStatistics(int startYear, int startQuarter, int endYear,
			int endQuarter, String itemIds, String siteId) {
		return quarterStoreDAO.getStatistics(startYear, startQuarter, endYear, endQuarter, itemIds, siteId);
	}

}
